<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>
<@head>
<link rel="stylesheet" href="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.css"/>
</@head>
<@body>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/moment.min.js"></script>
<script src="/misc/adminlte-2.3.7/plugins/daterangepicker/daterangepicker.js"></script>
<script src="/misc/app/js/salesman_paid_list.js"></script>
</@body>
<@layout_default>
<div class="box">
    <ul class="nav nav-tabs" role="tablist">
    	<li role="presentation"><a href="/salesmanCash/list">待支付</a></li>
        <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">已支付</a>
        </li>
    </ul>
   
    <div class="box-header with-border">
        <form name="form_query" class="form-inline" action="/salesmanCash/paidList">
            <input type="hidden" id="cTimeS_hidden" value="${timeLimitStart!}" />
            <input type="hidden" id="cTimeE_hidden" value="${timeLimitEnd!}" />
            <span class="pull-right text-muted">共 ${pagelist.resultTotal} 条记录</span>
        	<input type="hidden" id="resultTotal_hidden" value="${pagelist.resultTotal}" />
            <div class="input-group">
                <div class="input-group-addon">产品</div>
                <input type="text" class="form-control" style="width: 260px" name="proName" value="${proName!}" placeholder=""/>
            </div>
            <div class="input-group">
                <div class="input-group-addon">支付时间</div>
                <input type="text" class="form-control" id="cTime_start" name="timeLimitStart" size="18">
            </div>
            <div class="input-group"> 至 </div>
            <div class="input-group">
                <input type="text" class="form-control" id="cTime_end" name="timeLimitEnd" size="18">
            </div>

            <div class="input-group">
                <div class="input-group-addon">促销员</div>
                <input type="text" class="form-control" style="width: 260px" name="saleman" value="${saleman!}" placeholder="名称或手机号"/>
            </div>
            <button type="submit" class="btn btn-warning"><i class="fa fa-search"></i> 查询</button>
        </form>
    </div>
    
    
    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>申请编号</th>
                <th>提现产品</th>
                <th>瓶数</th>
                <th>促销员姓名</th>
                <th>手机号码</th>
                <th>金额</th>
                <th>申请时间</th>
                <th>支付时间</th>
                <th>状态</th>
            </tr>
            <#if (pagelist.result?size > 0)>
                <#list pagelist.result as item>
                    <tr>
                        <td>${item.code!}</td>
                        <td>${item.proName!}</td>
                        <td>${item.num!}</td>
                        <td>${item.salesmanName!}</td>
                        <td>${item.phone!}</td>
                        <td><#if item.pay_price?exists>${item.pay_price?string('0.00')}</#if></td>
                        <td>${item.c_time?number_to_datetime?string("yyyy-MM-dd HH:mm:ss")}</td>
                        <td><#if item.pay_time?exists>${item.pay_time?number_to_datetime?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
                        <td>
                           成功
                        </td>
                    </tr>
                </#list>
            <#else>
                <tr>
                    <td class="text-center text-muted" colspan="9"><i class="fa fa-info-circle"></i> 没有记录</td>
                </tr>
            </#if>
        </table>
        <table class="table table-striped table-hover">
        	<tr>
        		<td colspan="13" style="text-align:right;background-color:white;">
        			<a href="javascript:void(0);" name="btn_export"><i class="glyphicon glyphicon-save"></i> 数据导出</a>
        		</td>
        	</tr>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
        <@components.pagination "/salesmanCash/paidList?proName=${proName!}&saleman=${saleman!}&page=$page&timeLimitStart=${timeLimitStart!}&timeLimitEnd=${timeLimitEnd!}",pagelist.page,pagelist.pageTotal/>
    </div>
</div>

</@layout_default>